{% extends "uc/uc-base.html" %}
{% block content %}

    <div class="wrapper uc-router">
        <ul>
            <li><a href="{% url 'index' %}">TOP</a></li>
            <li><span class="divider"></span></li>
            <li><span><a href="{% url 'uc_account' %}">My Page</a></span></li>
            <li><span class="divider"></span></li>
            <li><span>ブックマーク</span></li>
        </ul>
    </div>

    <div class="wrapper">
        <div class="uc-main clearfix">

            <div class="uc-aside">
                <div class="uc-menu">
                    <div class="tit">My Page</div>
                    <ul class="sublist">
                        <li><a href="{% url 'uc_account' %}">アカウント</a></li>
                        <li><a href="{% url 'uc_collection' %}">ブックマーク</a></li>
                        <li><a href="{% url 'uc_history' %}">閲覧履歴</a></li>
                        <li><a href="{% url 'uc_vip' %}">有料会員</a></li>
                        <li><a href="{% url 'uc_contact' %}">問い合わせ</a></li>
                    </ul>
                </div>
            </div>
            <div class="uc-content">
                <div class="uc-panel">
                    <div class="uc-bigtit">ブックマーク</div>
                    <div class="uc-panel-bd">
                        <table class="evalute-table">
                            {% if collections %}
                                <tr class="hd">
                                <th width="360">
                                    <!-- <select name="" class="ui-txtin" style="width:120px;">
                                        <option value="">评价</option>
                                        <option value="">好价</option>
                                        <option value="">中价</option>
                                        <option value="">评价</option>
                                    </select>
                                    <select name="" class="ui-txtin ml10" style="width:120px;">
                                        <option value="">评论</option>
                                        <option value="">有评论内容</option>
                                        <option value="">无评论内容</option>
                                    </select> -->
                                    題名
                                </th>
                                <!-- <th>被评价人</th> -->
                                <th>作者</th>
                                <th class="align-center">操作</th>
                            </tr>
                                {% for h in collections %}
                                    <tr class="item">
                                        <td>
                                            <div class="cont good"></div>
                                            <a href="{% url 'article_details' h.article.id %}">
                                                {{ h.article.title }}
                                            </a>
                                    </div>
                                    </td>
                                    <!-- <td>商家：小米旗舰店</td> -->
                                    <td>作者：{{ h.article.user }}
                                    </td>
                                    <td class="align-center"><a class="ui-btn-theme uc-btn-md" href="{% url 'uc_collect' flag='uc' id=h.article.id %}">キャンセル</a></td>
                                    </tr>
                                {% endfor %}

                            {% else %}
                                <p>ブックマークなし</p>
                            {% endif %}


                    </table>

                    {% if collections %}
                        <div class="pages">
                            {% if collections.has_previous %}
                                <a class="page prev" href="?page={{ collections.previous_page_number }}">前へ</a>
                            {% endif %}

                        {% for num in collections.paginator.page_range %}
                            {% if collections.number == num %}
                                <span class="cur-page">{{ num }}</span>
                            {% else %}
                                <a class="page" href="?page={{ num }}">{{ num }}</a>
                            {% endif %}
                        {% endfor %}
{#                            <a class="page" href="">1</a>#}
{#                            <span class="cur-page">2</span>#}
{#                            <a class="page" href="">3</a>#}
{#                            <a class="page" href="">4</a>#}
{#                            <i class="page-split">...</i>#}
{#                            <a class="page" href="">71</a>#}
                            {% if collections.has_next %}
                                <a class="page next" href="?page={{ collections.next_page_number }}">後ろへ</a>
                            {% endif %}
                        </div>
                    {% endif %}
                </div>
            </div>
        </div>
    </div>
    </div>
    
{% endblock %}